<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN" "http://www.w3.org/TR/REC-html40/strict.dtd">

<html><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8"><title>C:\Users\Guillermo\Twitfav\func.php</title><link rel="stylesheet" type="text/css" href="../styles/main.css"><script language=JavaScript src="../javascript/main.js"></script><script language=JavaScript src="../javascript/prettify.js"></script><script language=JavaScript src="../javascript/searchdata.js"></script></head><body class="ContentPage" onLoad="NDOnLoad();prettyPrint();"><script language=JavaScript><!--
if (browserType) {document.write("<div class=" + browserType + ">");if (browserVer) {document.write("<div class=" + browserVer + ">"); }}// --></script>

<!--  Generated by Natural Docs, version 1.52 -->
<!--  http://www.naturaldocs.org  -->

<!-- saved from url=(0026)http://www.naturaldocs.org -->




<div id=Content><div class="CFile"><div class=CTopic id=MainTopic><h1 class=CTitle><a name="func.php"></a>func.php</h1><div class=CBody><!--START_ND_SUMMARY--><div class=Summary><div class=STitle>Summary</div><div class=SBorder><table border=0 cellspacing=0 cellpadding=0 class=STable><tr class="SMain"><td class=SEntry><a href="#func.php" >func.php</a></td><td class=SDescription></td></tr><tr class="SGroup"><td class=SEntry><a href="#Functions" >Functions</a></td><td class=SDescription></td></tr><tr class="SFunction SIndent1 SMarked"><td class=SEntry><a href="#RILtext" id=link1 onMouseOver="ShowTip(event, 'tt1', 'link1')" onMouseOut="HideTip('tt1')">RILtext</a></td><td class=SDescription>Parses the url with Read It Later API, so it returns only the text of the page. </td></tr><tr class="SFunction SIndent1"><td class=SEntry><a href="#parseFavs" id=link2 onMouseOver="ShowTip(event, 'tt2', 'link2')" onMouseOut="HideTip('tt2')">parseFavs</a></td><td class=SDescription>Parses the favorites of an user (an array of tweets) and returns the array with all the neccessaryv variables to fill HTML.</td></tr><tr class="SFunction SIndent1 SMarked"><td class=SEntry><a href="#getAuth" id=link3 onMouseOver="ShowTip(event, 'tt3', 'link3')" onMouseOut="HideTip('tt3')">getAuth</a></td><td class=SDescription>Gets the token and token secret for the user. </td></tr><tr class="SFunction SIndent1"><td class=SEntry><a href="#parseResources" id=link4 onMouseOver="ShowTip(event, 'tt4', 'link4')" onMouseOut="HideTip('tt4')">parseResources</a></td><td class=SDescription>Parses the resources (images, videos, webs..)</td></tr></table></div></div><!--END_ND_SUMMARY--></div></div></div>

<div class="CGroup"><div class=CTopic><h3 class=CTitle><a name="Functions"></a>Functions</h3></div></div>

<div class="CFunction"><div class=CTopic><h3 class=CTitle><a name="RILtext"></a>RILtext</h3><div class=CBody><blockquote><table border=0 cellspacing=0 cellpadding=0 class="Prototype"><tr><td><table border=0 cellspacing=0 cellpadding=0><tr><td class="PBeforeParameters  prettyprint "nowrap>function RILtext(</td><td class="PParameter  prettyprint " nowrap>$url</td><td class="PAfterParameters  prettyprint "nowrap>)</td></tr></table></td></tr></table></blockquote><p>Parses the url with Read It Later API, so it returns only the text of the page.&nbsp; If it doesn&rsquo;t find anything, it tries with the &lsquo;more&rsquo; option.</p><h4 class=CHeading>Parameters</h4><p>url: URL to parse.</p><h4 class=CHeading>Returns</h4><p>The text parsed, or an empty string if there was any error.</p><h4 class=CHeading>See also</h4><p><a href="http://readitlaterlist.com/api/docs/#text" class=LURL target=_top>http://readitlaterlist.com/api/docs/#text</a></p></div></div></div>

<div class="CFunction"><div class=CTopic><h3 class=CTitle><a name="parseFavs"></a>parseFavs</h3><div class=CBody><blockquote><table border=0 cellspacing=0 cellpadding=0 class="Prototype"><tr><td><table border=0 cellspacing=0 cellpadding=0><tr><td class="PBeforeParameters  prettyprint "nowrap>function parseFavs(</td><td class="PParameter  prettyprint " nowrap>$favs,</td><td class="PDefaultValuePrefix  prettyprint ">&nbsp;&nbsp;</td><td class="PDefaultValue  prettyprint " width=100%></td></tr><tr><td></td><td class="PParameter  prettyprint " nowrap>$limit</td><td class="PDefaultValuePrefix  prettyprint ">&nbsp;=&nbsp;</td><td class="PDefaultValue  prettyprint " width=100%>20</td><td class="PAfterParameters  prettyprint "nowrap>)</td></tr></table></td></tr></table></blockquote><p>Parses the favorites of an user (an array of tweets) and returns the array with all the neccessaryv variables to fill HTML.</p><h4 class=CHeading>Parameters</h4><p>favs: An array of tweets. limit: Maximum number of tweets to parse.</p><h4 class=CHeading>Returns</h4><h4 class=CHeading>An array with all the data needed to fill the page.&nbsp; The array will look like this</h4><blockquote><pre class="prettyprint">'text' =&gt; Tweet text
'screen' =&gt; Screen name of the user.
'user' =&gt; The name of the user.
'avatar' =&gt; The URL to the user's image.
'link' =&gt; A link to the tweet.
'id' =&gt; The tweet's ID, provided by Twitter.
'date' =&gt; Date of the tweet, formatted.
'res' =&gt; Indicates whether we detected attachments on the tweet or not.</pre></blockquote></div></div></div>

<div class="CFunction"><div class=CTopic><h3 class=CTitle><a name="getAuth"></a>getAuth</h3><div class=CBody><blockquote><table border=0 cellspacing=0 cellpadding=0 class="Prototype"><tr><td><table border=0 cellspacing=0 cellpadding=0><tr><td class="PBeforeParameters  prettyprint "nowrap>function getAuth(</td><td class="PParameterPrefix  prettyprint " nowrap>&amp;</td><td class="PParameter  prettyprint " nowrap>$auth</td><td class="PAfterParameters  prettyprint "nowrap>)</td></tr></table></td></tr></table></blockquote><p>Gets the token and token secret for the user.&nbsp; Also stores the token and token secret in the session and cookie.</p><h4 class=CHeading>Parameters</h4><p>auth: Passed by reference.&nbsp; Array in which the token and token secret will be stored, returning [&lsquo;token&rsquo;] and [&lsquo;token_secret&rsquo;].</p><h4 class=CHeading>Returns</h4><p>True if successful.&nbsp; False if not.&nbsp; The token and token_secret are stored in the array passed as argument.</p></div></div></div>

<div class="CFunction"><div class=CTopic><h3 class=CTitle><a name="parseResources"></a>parseResources</h3><div class=CBody><blockquote><table border=0 cellspacing=0 cellpadding=0 class="Prototype"><tr><td><table border=0 cellspacing=0 cellpadding=0><tr><td class="PBeforeParameters  prettyprint "nowrap>function parseResources(</td><td class="PParameterPrefix  prettyprint " nowrap></td><td class="PParameter  prettyprint " nowrap>$text,</td></tr><tr><td></td><td class="PParameterPrefix  prettyprint " nowrap>&amp;</td><td class="PParameter  prettyprint " nowrap>$resources</td><td class="PAfterParameters  prettyprint "nowrap>)</td></tr></table></td></tr></table></blockquote><p>Parses the resources (images, videos, webs..) in a string.</p><h4 class=CHeading>Parameters</h4><p>text: String containing the resources. resources: Passed by reference.&nbsp; Array with all the resources, each one with url and HTML embed code.</p><h4 class=CHeading>Returns</h4><p>True if resources were found.&nbsp; False if not.</p></div></div></div>

</div><!--Content-->


<div id=Footer><a href="http://www.naturaldocs.org">Generated by Natural Docs</a></div><!--Footer-->


<div id=Menu><div class=MEntry><div class=MFile id=MSelected>func.php</div></div><div class=MEntry><div class=MFile><a href="js/script-js.html">js\<wbr>script.js</a></div></div><div class=MEntry><div class=MFile><a href="SQLfunc-php.html">SQLfunc.php</a></div></div><div class=MEntry><div class=MFile><a href="miscel-php.html">What&rsquo;s this?</a></div></div><div class=MEntry><div class=MGroup><a href="javascript:ToggleMenu('MGroupContent1')">Index</a><div class=MGroupContent id=MGroupContent1><div class=MEntry><div class=MIndex><a href="../index/General.html">Everything</a></div></div><div class=MEntry><div class=MIndex><a href="../index/Files.html">Files</a></div></div><div class=MEntry><div class=MIndex><a href="../index/Functions.html">Functions</a></div></div></div></div></div><script type="text/javascript"><!--
var searchPanel = new SearchPanel("searchPanel", "HTML", "../search");
--></script><div id=MSearchPanel class=MSearchPanelInactive><input type=text id=MSearchField value=Search onFocus="searchPanel.OnSearchFieldFocus(true)" onBlur="searchPanel.OnSearchFieldFocus(false)" onKeyUp="searchPanel.OnSearchFieldChange()"><select id=MSearchType onFocus="searchPanel.OnSearchTypeFocus(true)" onBlur="searchPanel.OnSearchTypeFocus(false)" onChange="searchPanel.OnSearchTypeChange()"><option  id=MSearchEverything selected value="General">Everything</option><option value="Files">Files</option><option value="Functions">Functions</option></select></div></div><!--Menu-->



<!--START_ND_TOOLTIPS-->
<div class=CToolTip id="tt1"><div class=CFunction><blockquote><table border=0 cellspacing=0 cellpadding=0 class="Prototype"><tr><td><table border=0 cellspacing=0 cellpadding=0><tr><td class="PBeforeParameters  prettyprint "nowrap>function RILtext(</td><td class="PParameter  prettyprint " nowrap>$url</td><td class="PAfterParameters  prettyprint "nowrap>)</td></tr></table></td></tr></table></blockquote>Parses the url with Read It Later API, so it returns only the text of the page. </div></div><div class=CToolTip id="tt2"><div class=CFunction><blockquote><table border=0 cellspacing=0 cellpadding=0 class="Prototype"><tr><td><table border=0 cellspacing=0 cellpadding=0><tr><td class="PBeforeParameters  prettyprint "nowrap>function parseFavs(</td><td class="PParameter  prettyprint " nowrap>$favs,</td><td class="PDefaultValuePrefix  prettyprint ">&nbsp;&nbsp;</td><td class="PDefaultValue  prettyprint " width=100%></td></tr><tr><td></td><td class="PParameter  prettyprint " nowrap>$limit</td><td class="PDefaultValuePrefix  prettyprint ">&nbsp;=&nbsp;</td><td class="PDefaultValue  prettyprint " width=100%>20</td><td class="PAfterParameters  prettyprint "nowrap>)</td></tr></table></td></tr></table></blockquote>Parses the favorites of an user (an array of tweets) and returns the array with all the neccessaryv variables to fill HTML.</div></div><div class=CToolTip id="tt3"><div class=CFunction><blockquote><table border=0 cellspacing=0 cellpadding=0 class="Prototype"><tr><td><table border=0 cellspacing=0 cellpadding=0><tr><td class="PBeforeParameters  prettyprint "nowrap>function getAuth(</td><td class="PParameterPrefix  prettyprint " nowrap>&amp;</td><td class="PParameter  prettyprint " nowrap>$auth</td><td class="PAfterParameters  prettyprint "nowrap>)</td></tr></table></td></tr></table></blockquote>Gets the token and token secret for the user. </div></div><div class=CToolTip id="tt4"><div class=CFunction><blockquote><table border=0 cellspacing=0 cellpadding=0 class="Prototype"><tr><td><table border=0 cellspacing=0 cellpadding=0><tr><td class="PBeforeParameters  prettyprint "nowrap>function parseResources(</td><td class="PParameterPrefix  prettyprint " nowrap></td><td class="PParameter  prettyprint " nowrap>$text,</td></tr><tr><td></td><td class="PParameterPrefix  prettyprint " nowrap>&amp;</td><td class="PParameter  prettyprint " nowrap>$resources</td><td class="PAfterParameters  prettyprint "nowrap>)</td></tr></table></td></tr></table></blockquote>Parses the resources (images, videos, webs..)</div></div><!--END_ND_TOOLTIPS-->




<div id=MSearchResultsWindow><iframe src="" frameborder=0 name=MSearchResults id=MSearchResults></iframe><a href="javascript:searchPanel.CloseResultsWindow()" id=MSearchResultsWindowClose>Close</a></div>


<script language=JavaScript><!--
if (browserType) {if (browserVer) {document.write("</div>"); }document.write("</div>");}// --></script></body></html>